<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link href="__PUBLIC__/assets/css/select2.css" rel="stylesheet">

</block>
<block name="stylecss">
<style type='text/css'>
    table tr td{
        width: 80%;
    }
    table tr th{
        width: 16%;
        text-align: center;
        vertical-align: middle!important;
    }
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>
    <li>
		<a href="{:U('Banner/index')}">轮播图列表</a>
	</li>
	<li class="active">修改轮播图信息</li>
</ul><!-- /.breadcrumb -->

<!-- #section:basics/content.searchbox -->
<div class="nav-search" id="nav-search"></div><!-- /.nav-search -->
</block>
<block name="content">
<form action="__CONTROLLER__/banner_edit" method='post' id='myformedit' class="myformedit" enctype="multipart/form-data">
<input type="hidden" name='banner_id' value="{$banner_arr.banner_id}">
<input type="hidden" name='banner_path' value="{$banner_arr.banner_path}">
<input type="hidden" name='action' value="banner_edit_action">
<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-warning arrowed"><i class="ace-icon fa fa-user bigger-120"></i> 基本信息</span></div>
</div>
<table class="table table-striped table-bordered table-hover" >
    <tr>
        <th>轮播图</th>
        <td>
            <div class="nfile_imgbox" >
                <input type="file" class="nfile" id="file_upload" name="banner" />
                <?php if (!empty($banner_arr['banner_pic'])) { ?>
                <img src="{$banner_arr.banner_pic}" id="preview">
                <?php }else{ ?>
                <img src="__PUBLIC__/assets/images/addfile.png" id="preview">
                <?php } ?>
                <a class="nimg_style">+<img src=""> </a>
            </div>
        </td>
    </tr>
    <tr>
        <th>名称</th>
        <td><input type="text" name='banner_name' value="{$banner_arr.banner_name}" class="col-xs-6 nickname">
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>显示位置</th>
        <td><select name="banner_position" id="" class="col-xs-6">
            <option value="1" <?php if ($banner_arr['banner_position'] == 1): ?>selected<?php endif ?>>首页</option>
            <option value="2" <?php if ($banner_arr['banner_position'] == 2): ?>selected<?php endif ?>>考级</option>
            <option value="3" <?php if ($banner_arr['banner_position'] == 3): ?>selected<?php endif ?>>迷笛club</option>
        </select>
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>迷笛club ID</th>
        <td><input type="text" name='banner_midiclub_id' value="{$banner_arr.banner_midiclub_id}" class="col-xs-6 ninputxt" placeholder="迷笛club ID 首页或考级请填写-1">
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>是否显示</th>
        <td><select name="banner_display" id="" class="col-xs-6">
            <option value="0" <?php if ($banner_arr['banner_display'] == 0): ?>selected<?php endif ?>>不显示</option>
            <option value="1" <?php if ($banner_arr['banner_display'] == 1): ?>selected<?php endif ?>>显示</option>
        </select>
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>详细信息</th>
        <td><!-- 加载编辑器的容器 -->
            <script id="container" name="banner_content" type="text/plain"><?php echo $banner_arr['banner_content']; ?></script>
            <!-- 配置文件 -->
            <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
            <!-- 编辑器源码文件 -->
            <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
            <!-- 实例化编辑器 -->
            <script type="text/javascript">
                var ue = UE.getEditor('container');
            </script></td>
    </tr>
    <tr>
        <td colspan="2"><button type="submit" class="btn btn-sm btn-primary" >提交</button> <span class="btn btn-sm" onClick="location.href='{:U('Banner/index')}'">返回</span></td>
    </tr>
</table>
</form>
</block>
<block name="scripts">
<script src="__PUBLIC__/assets/js/select2.js"></script>
</block>
<block name="jscript">
<script script="text/javascript">
    $(function(){
        $('#menu_baseinfo').addClass('active open');
        $('#menu_banner_list').addClass('active');
    });
</script>

</block>